package com.scada.util;


import java.util.Date;
import java.util.Random;

public class RandomNumberUtil {

	public static String[] randomarray=new String[]{"1","2","3","4","5","6","7","8","9","a","b","c"};
	
	/**
	 * 当前日期+4位随机数
	 * @return
	 */
	public static String currentTimeRandomNumber(Integer number){
		
		StringBuffer randomStr=new StringBuffer(DateUtil.format(new Date(), "yyyyMMddHHmm")+"_");
		Random ran=new Random();
		for(int i=0;i<number;i++)
		{
			randomStr.append(randomarray[ran.nextInt(randomarray.length)]);
		}
		
		return randomStr.toString();
	}
}
